home *** CD-ROM | disk | FTP | other *** search
- /*================================================================================
- dialogUtilities.h
-
- circa 1991 by Greg Anderson
- greggor@apple.com
-
- This file contains various dialog box utility routines
- ================================================================================*/
- #ifndef __DIALOGUTILITIES__
- #define __DIALOGUTILITIES__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #ifndef __DIALOGS__
- #include <Dialogs.h>
- #endif
-
- //
- // This is the structure of an item in a dialog item list.
- // See IM I-427 for an explanation of the complete format
- // of a DITL
- //
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- typedef struct
- {
- long placeholder;
- Rect location;
- unsigned char itemType;
- unsigned char extraLength;
- } DITLitem;
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- extern RoutineDescriptor gCutPasteFilterRD;
-
- //
- // Prototypes for dialogUtilities.c
- //
- void SimpleBox(short id);
- void MessageBox(short id, Str255 pstr);
- void GiveUserAChanceToCancel( Str255 pstr );
- void CenterAndShowDialog(DialogPtr dlog);
- short AddNewUserItem( DialogPtr dlog );
- pascal void DrawDottedLineProc(DialogPtr dlog, short item);
- void SetUserItemToDottedLine( DialogPtr dlog, short whichItem );
- pascal void DrawFrameRectProc(DialogPtr dlog, short item);
- void SetUserItemToFrameRect( DialogPtr dlog, short whichItem );
- pascal void DrawDefaultProc(DialogPtr dlog, short item);
- short InstallDefaultOutline(DialogPtr dlog, short button);
- pascal void DrawActiveItemProc(DialogPtr dlog, short item);
- short InstallActiveItemOutline(DialogPtr dlog, short button);
- pascal void DrawGreyTransformProc(DialogPtr dlog, short item);
- short InstallGreyTransform(DialogPtr dlog, short button);
- void MoveOutline(DialogPtr dlog, short userItem, short button);
- void MoveActiveIndicator(DialogPtr dlog, short userItem, short button);
- void MoveDItem( DialogPtr dlog, short itemNumber, short h, short v );
- void SetItemHandle( DialogPtr dlog, short whichItem, Handle newItem );
- Point GetItemPoint( DialogPtr dlog, short itemNum );
- Boolean DialogItemEnabled(DialogPtr dlog, short item);
- void SetDialogItemDisableBit(DialogPtr dlog, short item, Boolean enable);
- void EnableButton(DialogPtr dlog, short button,Boolean enable);
- Boolean EnabledTEItemsExist(DialogPtr dlog);
- short FindNextEnabledTEItem(DialogPtr dlog, short item);
- void TabToNextEnabledTEItem(DialogPtr dlog);
- void EnableTEItem(DialogPtr dlog, short item, Boolean enable);
- Boolean GetCheckboxState(DialogPtr dlog, short checkbox);
- void SetCheckboxState(DialogPtr dlog, short checkbox, Boolean check);
- void ToggleCheckboxState(DialogPtr dlog, short checkbox);
- void FlashDlogItem( DialogPtr dlog, short itemNum );
- pascal Boolean CutPasteFilter( DialogPtr dlog, EventRecord* event, short* item );
-
- #endif
-